<?php

namespace App\Model\Task;

use App\Model\Model;
use Hyperf\Database\Model\SoftDeletes;
use Hyperf\Snowflake\Concern\Snowflake;

/**
 * @property bigint $id
 * @property integer $create_time
 * @property integer $update_time
 * @property integer $delete_time
 * @property boolean $status
 * @property bigint $task_id
 * @property decimal $price
 * @property string $types
 */
class TaskPayment extends Model
{
    use Snowflake;
    use SoftDeletes;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'task_payment';

    protected $fillable = [
        'create_time',
        'update_time',
        'delete_time',
        'status',
        'task_id',
        'user_id',
        'pay_price',
        'price',
        'types',
        'refresh_id',
        'top_id',
    ];

    public function Task()
    {
        return $this->hasOne(Task::class, 'id', 'task_id');
    }
}
